export default () => {
  let deepCopy = function (o) {
    if (o.constructor === Array) {
      let n = [];
      for (let i = 0; i < o.length; ++i) {
        n[i] = deepCopy(o[i]);
      }
      return n;
    } else if (o.constructor === Object) {
      let n = {};
      for (let i in o) {
        if (o.hasOwnProperty(i)) {
          n[i] = deepCopy(o[i]);
        }
      }
      return n;
    } else {
      return o;
    }
  };
};
